package com.dragon.modules.yuegou.mapper.product;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dragon.modules.yuegou.entity.product.CoupApplyEntity;
import com.dragon.modules.yuegou.model.product.ApplyCouponListModel;
import com.dragon.modules.yuegou.request.ApplyCouponListRequest;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 商品券申请表 Mapper接口
 *
 * @author pbuilder generated
 * @date 2021-05-07 09:22:29
 * @version 2.0
 */
@Component("proCoupApplyMapper")
public interface CoupApplyMapper extends BaseMapper<CoupApplyEntity> {

    /***
     * 分页查询
     * @param toPage
     * @param request
     * @return
     */
    IPage<ApplyCouponListModel> listPage(IPage<CoupApplyEntity> toPage, @Param("request") ApplyCouponListRequest request);

    List<ApplyCouponListModel> recordList(@Param("request")ApplyCouponListRequest listRequest);

    int changeReleased(@Param("applyId")String applyId, @Param("num")int num);
}
